import { get, post } from '../utils/request';
import { ApiResponse, CheckinRecord, CheckinStatus } from '../types';

/**
 * 每日签到
 */
export function dailyCheckin() {
  return post<ApiResponse<CheckinRecord>>('/checkin');
}

/**
 * 获取签到状态
 */
export function getCheckinStatus() {
  return get<ApiResponse<CheckinStatus>>('/checkin/status');
}

/**
 * 获取连续签到天数
 */
export function getCheckinStreak() {
  return get<ApiResponse<{ streak: number; totalDays: number }>>('/checkin/streak');
} 